package com.example.mghotel.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.mghotel.R;

public class ForgetPasswordActivity extends AppCompatActivity {

    private TextView tvLogin;
    private TextView tvRegister;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //设置页面布局
        setContentView(R.layout.activity_forget_password);

        //获取控件
        tvLogin = findViewById(R.id.tv_forget_password_login);
        tvRegister = findViewById(R.id.tv_forget_password_register);

        //设置控件事件
        setViewListener();
    }

    private void setViewListener() {
        //登录事件
        tvLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(ForgetPasswordActivity.this,LoginActivity.class);
                startActivity(intent);
            }
        });
        //注册事件
        tvRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(ForgetPasswordActivity.this,RegisterActivity.class);
                startActivity(intent);
            }
        });
    }
}
